import 'package:flutter/material.dart';
/**
 * ActionChip  
 * ActionChip这个控件可以用来做用户头像
 * 其中avatar是代表头像
 * label代表名称等
 * onPressed点击头像的行为
 */
class Show extends StatefulWidget {
  @override
  Sha createState() => new Sha();
}

class Sha extends State<Show> {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return new Scaffold(
        appBar: new AppBar(
          title: new Text("fsdf"),
          centerTitle: true,
        ),
        body: new ActionChip(
            avatar: new CircleAvatar(
              backgroundColor: Colors.grey.shade800,
              child: new Text('AB'),
            ),
            label: new Text('Aaron Burr'),
            onPressed: () {
              print("If you stand for nothing, Burr, what’ll you fall for?");
            }));
  }
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(home: new Show());
  }
}

void main() {
  runApp(new MyApp());
}
